import request from '../utils/request'

// 获取未删除的用户数据
export function getUserList() {
    return request({
        url: '/news',
        params: {
            // 后台过滤
            isdelete: 0
        } 
    })
}

// 获取对应分页数据
export function getUserPaging(query) {
    return request({
        url: '/doctorList',
        params: {
            ...query,
            // 后台过滤
            isdelete: 0
        }
    })
}

// 添加用户
export function addUser(Obj) {
    return  request({
        url: '/doctorList',
        method: 'post',
        data: Obj
    })
}

// 伪删除用户
export function delUserData(id){
    return request({
        url:`/doctorList/${id}`,
        method:'patch',
        data:{
            isdelete:1
        }
    })
}

